Type Property (Field Object)
The Type
property returns or sets the data type of the Field object. Read/write.
Syntax
objField.Type
Data Type
Integer
Remarks
The Type
property specifies the data type of the Field object and determines the range
of valid values that can be supplied for the Value
Valid data
types are as follows:
Type |
Description
|
Decimal
value |
OLE
variant type |
MAPI
property type |
|
|
|
|
|
vbNull |
Null |
1 |
VT_NULL |
PT_NULL |
vbInteger
|
Integer |
2 |
VT_I2 |
PT_I2 |
vbLong |
Long
integer |
3 |
VT_I4 |
PT_LONG |
vbSingle
|
4-byte real
(floating point) |
4 |
VT_R4 |
PT_R4 |
vbDouble
|
Double
(8-byte real) |
5 |
VT_R8 |
PT_DOUBLE,
PT_I8 |
vbCurrency
|
Currency |
6 |
VT_CY |
PT_CURRENCY
|
vbDate |
Date/time
(8-byte) |
7 |
VT_DATE |
PT_APPTIME,
PT_SYSTIME |
vbString
|
String |
8 |
VT_BSTR |
PT_TSTRING,
PT_BINARY |
vbBoolean
|
Boolean |
11 |
VT_BOOL |
PT_BOOLEAN |
vbDataObject
|
Data object
|
13 |
VT_UNKNOWN |
PT_OBJECT |
vbBlob |
Binary
(unknown format) |
65 |
VT_BLOB |
PT_BINARY |
|
|
|
|
|
Note that the
types vbNull and vbDataObject are not supported in version 1.0.
Note that
MAPI stores all custom properties that represent date and time information
using Greenwich Mean Time (GMT). The OLE Messaging Library converts these
properties so that the values appear to the user in local time.
Example
' Fragment from Fields_Add; uses the type
"vbString"
Set
objNewField = objFieldsColl.Add( _
Name:="Keyword", _
Class:=vbString, _
Value:="Peru")
' verify that
objNewField is a valid Field object
' Fragment from Field_Type; display the decimal type
value
MsgBox
"Field type = " & objOneField.Type